import request from '@/utils/request'

const api_name = '/admin/role/'

export default {
    getDataList(data) {
        return request({
            url: `${api_name}/page`,
            method: 'get',
            params: data
        })
    },
    deleteRole(data) {
        return request({
            url: `${api_name}/delete`,
            method: 'delete',
            data: data
        })
    },
    createRole(role) {
        return request({
            url: `${api_name}/create`,
            method: 'post',
            data: role
        })
    },
    getRole(data) {
        return request({
            url: `${api_name}/info`,
            method: 'get',
            params: data
        })
    },
    updateRole(role) {
        return request({

            url: `${api_name}/update`,
            method: 'post',
            data: role
        })
    }
}